package study2;

import java.util.Scanner;

//咖啡制作
public class Coffee extends HotDrink{
    Scanner scanner = new Scanner(System.in);
    //方法复写  抽象类的子类中必须复写抽象类的抽象方法
    @Override
    public void brew() {
        System.out.println("brew coffee bag");
    }

    @Override
    public void addCondiments() {
        System.out.println("adding sugar and milk");
    }

    @Override
    public boolean isCustomerWantCondiments() {
        System.out.println("您想要加糖和牛奶嘛 如果需要输入1 不需要输入0");
        String str = scanner.nextLine();
        if (str.equals("1")){
            return true;
        }else
        return false;
    }
}
